import Router from "koa-router"
import AdminController from '../controller/Admin.Controller'
let router = new Router({prefix:"/admin"})
import Tool from "../until/tool"


router.get("/getData",AdminController.getData)

router.get("/downLoadDate",AdminController.downLoadDate)

router.post("/downloadRunDate",AdminController.downloadRunData)

router.get("/getItem",AdminController.getItem)

router.post("/saveData",AdminController.saveDataList)

router.get("/getModuleNum",AdminController.getModuleNum)

router.get("/getAnayleRecord",AdminController.getAnayleRecord)

router.get("/getHistory",AdminController.getHistoryData)                // 获取指定设备的历史状态

router.get("/getStatusList",AdminController.getStatusList)

router.get("/deleteData",AdminController.isDel,AdminController.deleteData) //定期删除数据

router.get("/getErrorList",AdminController.getErrorList) // 获取报警信息列表

router.post("/addErrorRecord",AdminController.addErrorList) // 添加报警信息

router.delete("/removeErrorRecord",AdminController.removeErrorInfo) // 删除错误记录

router.put("/updateErrorState",AdminController.updateErrorState) // 修改报警的状态 0 => 待解决  1 => 进行中 2 => 已解决

router.get("/getErrorNum",AdminController.getErrorNum) // 获取报警统计今天、一周、一个月报警次数

router.get('/getSortPoint',AdminController.getSortPoint) // 获取监测点报警统计

export default router
